var page_login = {
	name: 'loginpage',
	template: `
	<div class="wh100 pr ofh trs2 pdtb10 pd010 bbx bgbody" name="login" :style="{'opacity': opacity}">
		<div name="page-login" class="wh100 ovy bgctx">
			<div class="icon flec center h160 pdtb50 bgf mart5 br2">
				<Logo class="w150"></Logo>
			</div>
			<div class="pdtb10">
				<Login></Login>
			</div>
			<div class="bottom-space"></div>
		</div>
	</div>`,
	data: function () {
		return {
			opacity: 0,
			id: 1,
			dataList:[],
			dataView:[],
		}
	},
	created: function () {
		let v = this;
		v.opacity = 1;
	},
	watch:{},
	methods: {
	}
}
var page_nav = {
	name: 'navpage',
	template: `
	<div name="nav" class="wh100 pr ofh trs2 pdtb10 pd010 bbx bgbody" >
		<div name="page-nav" class="wh100 ovy bgctx">
			<div class="mart10 sp2 fs15 and pdtb10 bbx flex flw ">
				<div v-for="(v,k) in links" class="pd010 br2 marb15 w50p" style="">
					<div router-link :to="v.v" @click="navTo(v,k)" :class="[v.v ? 'c333':'c999']">
						<div class="pdtb5 bgf br3 fs20" >
							<div class="center h40 flec cbsky" :class="v.s">
								<i class="fa " :class="v.i"></i>
							</div>
							<div class="flec pd010 center pdtb5 fs16">
								<div v-text="v.k"></div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		
	</div>`,
	data: function () {
		return {
			links:[
				{i:'fa-heart',    s:'',k:'用户服务',v:'/service'},
				{i:'fa-heartbeat',s:'',k:'正在服务',v:'/current_service'},
				{i:'fa-cubes',    s:'',k:'设备管理',v:'/device'},
				{i:'fa-cube',     s:'',k:'客户设备',v:''},
				{i:'fa-users',    s:'',k:'站内服务',v:''},
				{i:'fa-database', s:'',k:'数据查询',v:''},
				{i:'fa-question-circle-o',    s:'',k:'常见问题',v:''},
				{i:'fa-stethoscope',s:'fs22',k:'健康管理',v:''},
				{i:'fa-lock', s:'fs24',k:'密码修改',v:'/reset_password'},
				{i:'fa-sign-out',s:'fs22',k:'退出登录',v:'/'},
			],
		}
	},
	methods:{
		navTo(i,k){
			let v = this;
			if(i.v) {
				v.$router.push({path: i.v})
			} else{
				__message('功能未开放',3000,'co');
			}
		}
	}
};
var page_service = {
	name: 'service',
	template: `
	<div name="service" class="wh100 pr ovy trs2 pdtb10 pd010 bbx bgctx" >
		<div class="bgf mart10 br2">
			<div class="h30"></div>
			<div class="icon flec center h160">
				<div class="bd1e pd05 pdtb5 bgcb br3">
					<img class="w120" :src="avatar" />
				</div>
			</div>
			<div class="h20"></div>
		</div>
		<div class="mart10">
			<div class="pdtb10 bbx fs14 bgf br2 pd010 c333">
				<div class="h10"></div>
				<div class="fm-row flec marb10 bb1c">
					<div class="w40 pd010">
						<div class="w100 justify-all"><span>I&nbsp;D</span></div>
					</div>
					<div class="flex1 marl10 flec">
						<input type="text" v-model="user_id" class="bdn w100 ih c999" placeholder="请输入客人ID" />
					</div>
				</div>
				<div class="fm-row flec marb10 bb1c">
					<div class="w40 pd010">
						<div class="w100 justify-all"><span>姓名</span></div>
					</div>
					<div class="flex1 marl10 flec">
						<input type="text" v-model="username" class="bdn w100 ih c999" placeholder="请输入客人姓名" />
					</div>
				</div>
				<div class="h10"></div>
			</div>
			<div class="h20"></div>
			<div class="mart10 bgf br2 pdtb10">
				<div class="fm-row flec pd010 ">
					<div class="w100 flec sp2 cfff ">
						<div class="w100 br49 ofh subh btn center bbx bgcb" @click="doNext()" >
							<span>下一步</span>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>`,
	data: function () {
		return {
			avatar:'./static/img/cube_174.png',
			user_id:'21',
			username:'A',
		}
	},
	methods:{
		doNext (u) {
			let v = this;
			if (!v.user_id) {
				__message('请输入用户ID');
			}
			__ls('user_id',v.user_id);
			__ls('username',v.username);
			v.checkUserInfo();
		},
		checkUserInfo(){
			let v = this;
			let dt = {
				btoken: __gls('btoken'),
				user_id: __gls('user_id'),
				username: __gls('username'),
			}
			__post({url:__api.useri,data:dt,method:'GET'}).then(r => {
				if (r.code == 200) {
					v.$router.push({path:'/user_service'});
				} else {
					__message(r.msg,5000,'cr');
				}	
			}).catch(e =>{ console.log(e);})
		}
	}
};
var page_user_service = {
	name: 'user_service',
	template: `
	<div name="nav" class="wh100 fs14 pr ovy trs2 pdtb10 pd010 bbx bgctx" >
		<div class="h10"></div>
		<div name="userBaseInfo" class="bgf br2 pdtb10 pd010">
			<div class="title marb5 pdtb5">
				<div class= "fs16 fsw sp1"><span>用户信息</span></div>
			</div>
			<div class="w100 h5 bgco3"></div>
			<div class="lh20 mart5">
				<UserStatus></UserStatus>
			</div>
		</div>
		<div class="h20"></div>
		<div class="pdtb10 pd010 br2 bgf bbx">
			<div class="title marb5 pdtb5">
				<div class="fs16 fsw sp1"><span>推荐服务</span></div>
			</div>
			<div class="w100 h5 bgco3"></div>
			<div v-for="(v,k) in serviceAll" class="service-item bb1e" >
				<div class="h40 flec w100" name="serviceName">
					<div class="w30 flec" @click="doSelectAi(v,k)" >
						<div class="wh20 bbx btn center bd1a" >
							<i v-if="indexS == k" class="fa fa-check"></i>
						</div>
					</div>
					<div  class="flex1 lh25">
						<div class="flex1 flec fs14">
							<div class="flex1 flec" @click="viewSelectAi(v,k)">
								<div class="w100 txt"><span v-text="v.k"></span></div>
							</div>
							
						</div>
					</div>
					<div>
						<div class="w30 h30 flec center" @click="v.open = !v.open">
							<div class="btn center wh20"><span class="fa fa-angle-down"></span></div>
						</div>
					</div>
				</div>
				<div name="serviceContent" class="bgf7" :class="[v.open ? '' : 'h0 ofh']">
					<div class="of" >
						<div v-for="(a,b) in v.content" class="h30 flec">
							<div class="w30"></div>
							<div class="flex1" ><div class="txt" v-text="a.name"></div></div>
							<div class="w60 txt right" v-text="a.value"></div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="h20"></div>
		<div class="pdtb10 pd010 br2 bgf bbx">
			<div class="title marb5 pdtb5">
				<div class="fs16 fsw sp1"><span>正在服务</span></div>
			</div>
			<div class="w100 h5 bgco3"></div>
			<div name="userService" class="pdtb10">
				<div v-for="(v,k) in service" class="service-item  flec bb1e pdtb5" _click="doSelect(v,k)"
					@click="continueService(v,k,'/continue_service')" >
					<div class="w30 flec_ disn">
						<div class="wh20 bbx btn center bd1a" >
							<i v-if="index == k" class="fa fa-check"></i>
						</div>
					</div>
					<div class="flex1 ">
						<div class="flex1 flec fs14 h25 cb2">
							<div class="flex1 flec">
								<div class="w100 txt"><span v-text="v.name"></span></div>
							</div>
							<div class=" flec">
							</div>
						</div>
						<div class="flex1 flec fs12 h25">
							<div class="flex1 flec">
								<div class="flex1 "><span>服务状态</span></div>
								<div class=""><span v-text="v.status_name"></span></div>
							</div>
						</div>
					</div>
				</div>
			</div>
			
		</div>
		<div class="h20"></div>
		<div class="pdtb10 pd010 br2 bgf bbx lh25">
			<div class="title flec bb1e pdtb5">
				<div class="pd05 w50 marr10 justify-all"><span>体温</span></div>
				<div class="pd05 "><span>36.30</span></div>
			</div>
			<!--
			<div class="title bb1f bb1e pdtb5">
				<div class="pd05 w50 marr10 justify-all"><span>备注</span></div>
			</div>
			<div class="pdtb10 bgf1 br2 pd05 mih101 ovy justify c666">
				<div>。</div>
			</div>
			-->
		</div>
		<div  class="pdtb10 pd010 br2 bgf bbx mart10">
			<div class="flec cfff">
				<div class="flex1 flec center ">
					<div v-if="indexS > -1" class="h30 w100 btn bgco2" @click="startService()">
						<span >开始服务</span>
					</div>
					<!--
					<div v-if="index > -1" class="h30 w100 btn bgco2" @click="continueService('/continue_service')">
						<span v-if="selectedService.status == 0">继续服务</span>
						<span v-else>服务详情</span>
					</div>
					-->
				</div>
				<div class="w40"></div>
				<div class="flex1 flec center">
					<div class="h30 w100 btn bgco2" @click="linkto('/user_exam')">
						<span>开始评估</span>
					</div>
				</div>
			</div>
		</div>
		<div class="h50"></div>
	</div>`,
	data: function () {
		return {
			service:[
				{ck:false,k:'能量养睡',times:20,last:'2020-03-02'},
				{ck:false,k:'皮肤护理',times:20,last:'2020-03-02'},
			],
			status: 0,
			serviceAll:[],
			index: -1,
			indexS: -1,
			selectedService:{},
			selectedServiceA: {},
		}
	},
	created(){
		let v = this;
		v.getServiceAll();
		v.getUserService();
	},
	methods:{
		getServiceAll() {
			let v = this;
			let uri = 'api/doctor/service/get_system_service';
			uri = 'api/doctor/service/get_system_service';
			let dt = {page:1,btoken: __gls('btoken'),};
			v.serviceAll = [];
			__post({url: uri,data:dt,method:'GET'}).then(r => {
				if (r.code == 200) {
					let l = r.data.list || [];
					let a = [];
					for (let i in l) {
						let it = {open: false, ck: false,v:l[i].service_id,k:l[i].name,times:l[i].status,last:l[i].status_name,content:l[i].content};
						a.push(it);
					}
					v.serviceAll = a;
					console.log('serviceAll',a)
				} else {
					__message(r.msg,5000,'cr');
				}
			}).catch(e =>{ console.log(e);})
			
		},
		doSelectAi(i,k){
			let v = this;
			v.indexS = k;
			console.log('doSelectAi',i)
			for (let n in v.serviceAll) v.serviceAll[n].ck = false;
			i.ck = !i.ck;
			v.selectedServiceA = __copy(i);
			if(!i.ck) v.indexS = -1;
			__ls('user_Selected_service_id',i);
		},
		startService(){
			let v = this;
			let uri = 'api/doctor/service/start';
			let dt = {service_id:v.selectedServiceA.v, num:1, btoken: __gls('btoken'),};
			__post({url: uri,data:dt,method:'GET'}).then(r => {
				if (r.code == 200) {
					__message(r.msg || '添加服务项目成功', 3000, 'cg');
					v.getUserService();
					v.indexS = -1;
					console.log('serviceAll',a);
				} else {
					__message(r.msg, 5000, 'cr');
				}
			}).catch(e =>{ console.log(e);})
		},
		getUserService () {
			let v = this;
			let dt = {page:1,btoken: __gls('btoken'),};
			v.service = [];
			__post({url:__api.service,data:dt,method:'GET'}).then(r => {
				if (r.code == 200) {
					let l = r.data.list || [];
					let a = [];
					for (let i in l) {
						let it = __copy(l[i]);
						it.ck = false;
						a.push(it);
					}
					v.service = a;
				} else {
					__message(r.msg,5000,'cr');
				}
			}).catch(e =>{ console.log(e);})
		},
		doSelect (i,k) {
			let v = this;
			v.index = k;
			for (let n in v.service) v.service[n].ck = false;
			i.ck = true;
			v.selectedService = __copy(i);
			__ls('user_service_id',i.v);
		},
		viewSelectAi(i,k){
			let v = this;
			console.log('viewSelectAi',i);
			//__ls('user_service_id',i.user_service_id);
			//v.$router.push({path:'info_service'});
		},
		continueService(i,k,p) {
			let v = this;
			console.log('continueService',i);
			__ls('service_id',i.service_id);
			__ls('user_service_id',i.user_service_id);
			v.$router.push({path:p});
		},
		linkto (u) {
			let v = this;
			console.log('u',u)
			v.$router.push({path:u});
		},
	}
};
var page_info_service = {
	name: 'info_service',
	template: `
	<div name="continue" class="wh100 fs14 pr ovy trs2 pdtb10 pd010 bbx bgctx" >
		<div class="h10"></div>
		<div class="bgf br2 pdtb10 pd010">
			<div class="title marb5 pdtb5">
				<div class= "fs16 fsw sp1"><span>项目信息</span></div>
			</div>
			<div class="w100 h5 bgcb2"></div>
			<div class="info left pdtb10 lh25 flw bb1e">
				<div class="marr10 flec cb2">
					<div class="w100 txt"><span v-text="info.name"></span></div>
				</div>
				<div class="flex1 flec fs12">
					<div class="flex1 "><span>最后服务时间</span></div>
					<div class="pd05"><span v-text="info.last"></span></div>
				</div>
				<div class="flex1 flec fs12">
					<div class="flex1 ">
						<span>已完成</span>
						<span v-text="info.num"></span>
						<span>次</span>
					</div>
					<div class="pd05">
						<span>共</span>
						<span v-text="info.total"></span>
						<span>次</span>
					</div>
				</div>
			</div>
			<div class="pdtb5 br5 bgf bbx lh25">
				<div class="pdtb5 br2 pd05 mih101 bgf5 left ovy lh20">
					<div class="idx disn" v-text="info.content">
					由于致热原的作用使体温调定点上移而引起的调节性体温升高(超过0.5℃)因素(时间温相比较。如不知自己原来的体温,则腋窝体温(检测10分钟)超过37.4℃可定为发热。</div>
					
					<div v-if="dataList">
						<div class="marb5 flec h40 bb1e" v-for="(v,k) in dataList">
							<div>
								<span v-text="v.name"></span>
							</div>
							<div class="flex1"></div>
							<div>
								<span v-text="v.value"></span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="pdtb5 lh25 pd010 mart10 br2 bgf bbx">
			<div class="bb1e pdtb5">
				<div class="title">
					<div class="pd05 w50 marr10 justify-all"><span>反馈</span></div>
				</div>
				<div class="pdtb5 br2 mart5 pd05 mih101 bd1c ovy lh20">
					<div class="idx">(超过0.5℃)因素(时间温相比较。如不知自己原来的体温,则腋窝体温(检测10分钟)超过37.4℃可定为发热。</div>
				</div>
			</div>
			<div class="bb1e pdtb5">
				<div class="title">
					<div class="pd05 w50 marr10 justify-all"><span>备注</span></div>
				</div>
				<div class="pdtb5 br2 mart5 pd05 mih101 bd1c ovy lh20 bgf1">
					<div class="idx">因素(时间温相比较。如不知自己原来的体温,则腋窝体温(检测10分钟)超过37.4℃可定为发热。</div>
				</div>
			</div>
		</div>
		<div class="pdtb10 pd010 br5 bbx">
			<div class="flec cfff" v-if="service">
				<div class="flex1 flec center " v-if="service.status != 2">
					<div class="h30 w100 btn bgco2 br2" @click="linkto('/do_service')">
						<span v-if="status == 0">开始服务</span>
						<span v-if="status == 1">继续服务</span>
					</div>
				</div>
			</div>
		</div>
		<div class="h40"></div>
	</div>`,
	data: function () {
		return {
			info:{
				name:'能量养睡',
				last:'2020-03-02',
				times:20,
				sugar:'******',
				content:'',
				service: {},
			},
			status: 0,
			service: null,
			dataList: [], 
			index: -1,
		}
	},
	created () {
		let v = this;
		v.getDetail();
	},
	methods:{
		getDetail () {
			let v = this;
			let dt = {
				user_service_id: __gls('user_service_id'),
				btoken:__gls('btoken'),
			}
			__post({url:__api.deatil,data:dt,method:'GET'}).then(r => {
				if (r.code == 200) {
					let l = r.data;
					let ctx = l.content;
					let content = ctx;
					if(typeof ctx == 'string') {
						content = JSON.parse(ctx);
					}
					v.info.name    = l.name;
					v.info.content = content;
					v.info.last    = l.last_time;
					v.dataList = content;
					v.service = l;
					v.status = parseInt(l.status) || 0;
					// console.log()
					console.log('getDetail', v.service, content)
				} else {
					__message(r.msg,5000,'cr');
				}
			}).catch(e =>{ console.log(e);})
		},
		
		linkto (u) {
			let v = this;
			console.log('u',u)
			v.$router.push({path:u});
		},
	}
};
var page_continue_service = {
	name: 'continue_service',
	template: `
	<div name="continue" class="wh100 fs14 pr ovy trs2 pdtb10 pd010 bbx bgctx" >
		<div class="h10"></div>
		<div class="bgf br2 pdtb10 pd010">
			<div class="title marb5 pdtb5">
				<div class= "fs16 fsw sp1"><span>正在服务</span></div>
			</div>
			<div class="w100 h5 bgcb2"></div>
			<div class="info left pdtb10 lh25 flw bb1e">
				<div class="marr10 flec cb2">
					<div class="w100 txt"><span v-text="info.name"></span></div>
				</div>
				<div class="flex1 flec fs12">
					<div class="flex1 "><span>最后服务时间</span></div>
					<div class="pd05"><span v-text="info.last"></span></div>
				</div>
				<div v-if="info.status_name" class="cr pdtb5" >
					<span v-text="info.status_name"></span>
				</div>
				<div class="flex1 flec fs12">
					<div class="flex1 ">
						<span>已完成</span>
						<span v-text="info.num"></span>
						<span>次</span>
					</div>
					<div class="pd05">
						<span>总共</span>
						<span v-text="info.total"></span>
						<span>次</span>
					</div>
				</div>
			</div>
			<div class="pdtb5 br5 bgf bbx lh25">
				<div class="pdtb5 br2 pd05 mih101 bgf5 left ovy lh20">
					<div class="idx disn" v-text="info.content">
					由于致热原的作用使体温调定点上移而引起的调节性体温升高(超过0.5℃)因素(时间温相比较。如不知自己原来的体温,则腋窝体温(检测10分钟)超过37.4℃可定为发热。</div>
					
					<div v-if="dataList">
						<div class="marb5 flec h40 bb1e" v-for="(v,k) in dataList">
							<div>
								<span v-text="v.name"></span>
							</div>
							<div class="flex1"></div>
							<div>
								<span v-text="v.value"></span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<div class="pdtb5 lh25 pd010 mart10 br2 bgf bbx c666 fs12">
			<div class="bb1e pdtb5" v-if="remark" name="remark">
				<div class="title">
					<div class="pd05 w40 marr10 justify-all"><span>备注</span></div>
				</div>
				<div class="pdtb5 br2 mart5 pd05 mih101 bd1c ovy lh20">
					<div class="" v-text="remark">(超过0.5℃)因素(时间温相比较。如不知自己原来的体温,则腋窝体温(检测10分钟)超过37.4℃可定为发热。</div>
				</div>
			</div>
			<div class="bb1e pdtb5" v-if="feedback" name="feedback">
				<div class="title">
					<div class="pd05 w40 marr10 justify-all"><span>反馈</span></div>
				</div>
				<div class="pdtb5 br2 mart5 pd05 mih101 bd1c ovy lh20 bgf1">
					<div class="" v-text="feedback">因素(时间温相比较。如不知自己原来的体温,则腋窝体温(检测10分钟)超过37.4℃可定为发热。</div>
				</div>
			</div>
		</div>
		<div class="pdtb10 pd010 br5 bbx">
			<div class="flec cfff" v-if="service">
				<div class="flex1 flec center " v-if="service.status != 2">
					<div class="h30 w100 btn bgco2 br2" @click="startService('/do_service')">
						<span v-if="status == 0">开始服务</span>
						<span v-if="status == 1">继续服务</span>
					</div>
				</div>
			</div>
		</div>
		<div class="h40"></div>
	</div>`,
	data: function () {
		return {
			info:{
				name:'能量养睡',
				last:'2020-03-02',
				times:20,
				sugar:'******',
				content:'',
				status_name: '',
				total: 1,
				num: 0,
				service: {},
			},
			remark: '',
			feedback: '',
			status: 0,
			service: null,
			dataList: [], 
			index: -1,
		}
	},
	created () {
		let v = this;
		v.getDetail();
	},
	methods:{
		getDetail () {
			let v = this;
			let dt = {
				user_service_id: __gls('user_service_id'),
				btoken:__gls('btoken'),
			}
			__post({url:__api.deatil,data:dt,method:'GET'}).then(r => {
				if (r.code == 200) {
					let l = r.data;
					let ctx = l.content;
					let content = ctx;
					if(typeof ctx == 'string') {
						content = JSON.parse(ctx);
					}
					v.info.name    = l.name;
					v.info.content = content;
					v.info.last    = l.last_time;
					v.info.status_name = l.status_name;
					v.info.total   = l.total;
					v.info.num     = l.num;
					v.dataList     = content;
					v.remark       = l.remark;
					v.feedback     = l.feedback;
					v.service = l;
					v.status  = parseInt(l.status) || 0;
					// console.log()total feedback
					console.log('getDetail', v.service, content)
				} else {
					__message(r.msg,5000,'cr');
				}
			}).catch(e =>{ console.log(e);})
		},
		startService(){
			let v = this;
			let uri = 'api/doctor/service/start';
			let dt = {service_id: __gls('service_id'), num:1, btoken: __gls('btoken'),};
			__post({url: uri,data:dt,method:'GET'}).then(r => {
				if (r.code == 200) {
					__message(r.msg || '', 3000, 'cg');
					console.log('serviceAll',r);
					v.$router.push({path:'/do_service'});
				} else {
					if(r.msg == '正在服务中'){
						v.$router.push({path:'/do_service'});
					} else {
						__message(r.msg, 5000, 'cr');
					}
					
				}
			}).catch(e =>{ console.log(e);})
		},
		linkto (u) {
			let v = this;
			console.log('u',u)
			v.$router.push({path:u});
		},
	}
};
var page_do_service = {
	name: 'do_service',
	template: `
	<div name="do_service" class="wh100 pr ovy trs2 pdtb10 pd010 bbx bgctx" >
		<div class="h10"></div>
		<div class="pdtb10 pd010 bgf br2">
			<div class="title marb5 pdtb5">
				<div class= "fs16 fsw sp1"><span>本次服务内容</span></div>
			</div>
			<div class="w100 h5 bgco2"></div>
			<div class="info flec center pdtb10 lh25 flw bb1e">
				<div class="flex1 flec">
					<div class="marr10 justify-all"><span>服务名称</span></div>
					<div class="pd05"><span v-text="info.name"></span></div>
				</div>
			</div>
			<div class="mart10 pdtb5 br5 bgf bbx lh25">
				<div class="pdtb5 br2 pd05 mih101 bgf5 left ovy">
					<div v-if="dataList">
						<div class="marb5 flec h40 bb1e" v-for="(v,k) in dataList">
							<div>
								<span v-text="v.name"></span>
							</div>
							<div class="flex1"></div>
							<div>
								<span v-text="v.value"></span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="mart10 pdtb10 pd010 br2 bgf bbx fs12">
			<div class="title">
				<div class="pd05 w50 marr10 justify-all"><span>备注</span></div>
			</div>
			<div class="pdtb10 br2 mart5 pd05 mih101 bd1c">
				<textarea class="w100 h80 bbx pd5 lh20 bdn" v-model="remark" placeholder="此次服务备注" style="resize:none;"></textarea>
			</div>
		</div>
		<div class="mart10 pdtb10 pd010 br2 bgf bbx fs12">
			<div class="title">
				<div class="pd05 w50 marr10 justify-all"><span>反馈</span></div>
			</div>
			<div class="pdtb10 br2 mart5 pd05 mih101 bd1c">
				<textarea class="w100 h80 bbx pd5 lh20 bdn" v-model="feedback" placeholder="此次服务反馈" style="resize:none;"></textarea>
			</div>
		</div>
		<div class="mart20 pdtb10 pd010 br2 bgf bbx">
			<div class="flec cfff">
				<!--<div class="flex1 flec center ">
					<div class="h30 w100 btn bgco2" @click="doEnd(-1)">
						<span>取消服务</span>
					</div>
				</div>-->
				<div class="flex1 flec center ">
					<div class="h30 w100 btn bgco2" @click="doPause(-1)">
						<span>服务暂停</span>
					</div>
				</div>
				<div class="w40"></div>
				<div class="flex1 flec center">
					<div class="h30 w100 btn bgco2" @click="doEnd(2)">
						<span>完成服务</span>
					</div>
				</div>
			</div>
		</div>
	</div>`,
	data: function () {
		return {
			info:{
				name:'能量养睡',
				last:'2020-03-02',
				times:20,
				sugar:'******',
				content:'',
			},
			remark: '',
			feedback: '',
			index: -1,
			dataList: [],
		}
	},
	created () {
		let v = this;
		v.getDetail();
	},
	methods:{
		getDetail () {
			let v = this;
			let dt = {
				user_service_id: __gls('user_service_id'),
				btoken:__gls('btoken'),
			}
			__post({url:__api.deatil,data:dt,method:'GET'}).then(r => {
				if (r.code == 200) {
					let l = r.data;
					let ctx = l.content;
					let content = ctx;

					if(typeof ctx == 'string') {
						content = JSON.parse(ctx);
					}
					v.info.name    = l.name;
					v.info.content = content;
					v.info.last    = l.last_time;
					v.remark       = l.remark;
					v.feedback     = l.feedback;
					v.dataList = content;
				} else {
					__message(r.msg,5000,'cr');
				}
			}).catch(e =>{ console.log(e);})
		},
		doPause() {
			let v = this;
			let uri = 'api/doctor/service/suspend';
			let dt = {
				service_id: __gls('service_id'),
				remark: v.remark,
				feedback: v.feedback,
				btoken:__gls('btoken'),
			}
			__post({url:uri,data:dt,method:'GET'}).then(r => {
				if (r.code == 200) {
					v.navToUService();
					__message(r.msg,5000,'cg');
				} else {
					__message(r.msg,5000,'cr');
				}
			}).catch(e =>{ console.log(e);})
		},
		doEnd (st) {
			let v = this;
			let dt = {
				user_service_id: __gls('user_service_id'),
				status: 2,
				btoken:__gls('btoken'),
			}
			__post({url:__api.finish,data:dt,method:'GET'}).then(r => {
				if (r.code == 200) {
					let l = r.data;
					v.navToUService();
					__message(r.msg,5000,'cg');
				} else {
					__message(r.msg,5000,'cr');
				}
			}).catch(e =>{ console.log(e);})
		},
		navToUService(){
			let v = this;
			v.$router.push({path:'/user_service'});
		},
		linkto (u) {
			let v = this;
			console.log('u',u)
			v.$router.push({path:u});
		},
	}
};
var page_current_service = {
	name: 'current_service',
	template: `
	<div name="current_service" class="wh100 pr ovy trs2 pdtb10 pd010 bbx flex flc bgctx" >
		<div class="h10"></div>
		<div class="w100 bgf pd05 bb1a">
			<div class="title marb5 pdtb5">
				<div class="fs16 fsw sp1"><span>服务用户</span></div>
			</div>
			<div class="w100 h5 bgcb bgcb2_"></div>
			<div class="flec fsw center h35 pdtb5">
				<div class="w40 center"><span>ID</span></div>
				<div class="flex1"><span>用户</span></div>
				<div class="w70"><span>服务中</span></div>
				<div class="w40"><span>累计</span></div>
			</div>
		</div>
		<div class="w100 flex1 ovy">
			<div class="wh100 ovy bbx pd05 bgf08">
				<div v-for="(v,k) in service" class="info flec center pdtb10 lh25 flw btn bb1d btn" @click="checkUserInfo(v,k)">
					<div class="flex1 flec">
						<div class="w40"><span v-text="v.user_id"></span></div>
						<div class="flex1"><span v-text="v.username">客人</span></div>
						<div class="w70"><span v-text="v.num">状态</span></div>
						<div class="w40"><span v-text="v.total">状态</span></div>
					</div>
				</div>
			</div>
		</div>
	</div>`,
	data: function () {
		return {
			info:{
				name:'能量养睡',
				last:'2020-03-02',
				times:20,
				sugar:'******',
			},
			service:[
				{id:1,name:'能量养睡',last:'2020-03-02',user:'小王',status:'服务中',},
				{id:2,name:'皮肤护理',last:'2020-03-02',user:'老王',status:'暂停中',},
				{id:1,name:'能量养睡',last:'2020-03-02',user:'小王',status:'服务中',},
				{id:2,name:'皮肤护理',last:'2020-03-02',user:'老王',status:'暂停中',},
				{id:1,name:'能量养睡',last:'2020-03-02',user:'小王',status:'服务中',},
				{id:2,name:'皮肤护理',last:'2020-03-02',user:'老王',status:'暂停中',},
				{id:1,name:'能量养睡',last:'2020-03-02',user:'小王',status:'服务中',},
				{id:2,name:'皮肤护理',last:'2020-03-02',user:'老王',status:'暂停中',},
			],
			index: -1,
		}
	},
	created () {
		let v = this;
		v.getUserList();
	},
	methods:{
		getUserList(){
			let v = this;
			let uri = 'api/doctor/service/user_list';
			let dt = { btoken: __gls('btoken'),};
			__post({url: uri ,data:dt, method:'GET'}).then(r => {
				if(r.code == 200){
					let l = r.data.list || [];
					v.service = l;
				}
			}).catch(e =>{ console.log(e);})
		},
		checkUserInfo(i,k){
			let v = this;
			let dt = {
				btoken: __gls('btoken'),
				user_id: i.user_id,
				username: i.username,
			}
			__post({url:__api.useri,data:dt,method:'GET'}).then(r => {
				if (r.code == 200) {
					v.$router.push({path:'/user_service'});
				} else {
					__message(r.msg,5000,'cr');
				}	
			}).catch(e =>{ console.log(e);})
		},
		linkto (i,k) {
			let v = this;
			let u = '/ing_service';
			let p = '/user_service'
			// v.$router.push({path:p,query:{id:i.id}});
		},
	}
};
var page_ing_service = {
	name: 'ing_service',
	template: `
	<div name="nav" class="wh100 pr ovy trs2 pdtb10 pd010 bbx flex flc bgctx" >
		<div class="h10"></div>
		<div class="pdtb10 pd010 bgf br2">
			<div class="title marb5 pdtb5">
				<div class= "fs16 fsw sp1"><span>服务情况</span></div>
			</div>
			<div class="w100 h5 bgco2"></div>
		</div>
		<div class="w100 flex1 ovy pdtb10 pd010 bgf br2 mart10">
			<div class="wh10 ovy">
				<div class="info flec center pdtb10 lh25 flw bb1e">
					<div class="flex1 flec">
						<div class="marr10 justify-all"><span>服务名称</span></div>
						<div class="pd05"><span v-text="info.name"></span></div>
					</div>
				</div>
				<div class="pdtb5 br5 bgf bbx lh25">
					<div class="pdtb5 br2 pd05 mih101 bgf5 btn ovy">
						<div class="idx">如不知自己原来的体温,则腋窝体温(检测10分钟)超过37.4℃可定为发热。</div>
					</div>
				</div>
				<div class="bb1e marb5"></div>
				<div class="pdtb10 br5 bgf bbx">
					<div class="title">
						<div class="pd05 w50 marr10 justify-all"><span>备注</span></div>
					</div>
					<div class="pdtb10 br2 mart5 pd05 mih101 bd1c"></div>
				</div>
				<div class="pdtb10 br5 bbx mart10">
					<div class="flec cfff">
						<div class="flex1 flec center ">
							<div class="h30 w100 btn bgco2" @click="cancel">
								<span>取消</span>
							</div>
						</div>
						<div class="w40"></div>
						<div class="flex1 flec center">
							<div class="h30 w100 btn bgco2" @click="finish">
								<span>完成</span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>`,
	data: function () {
		return {
			info:{
				name:'能量养睡',
				last:'2020-03-02',
				times:20,
				sugar:'******',
			},
			id:-1,
		}
	},
	created(){
		let v = this;
		let q = v.$route.query;
		console.log('q',q)
		if (q && q.id) {
			v.id = q.id;
		}
	},
	methods:{
		cancel(){
			let v = this;
			v.$router.push({path:'/'})
		},
		finish(){},
	}
};
var page_user_exam = {
	name: 'user_exam',
	template: `
	<div name="user_exam" class="wh100 pr trs2 pdtb10 pd010 bbx flex flc bgctx" >
		<div class="h10"></div>
		<div class="pdtb10 pd010 bgf br2">
			<div class="title marb5 pdtb5">
				<div class= "fs16 fsw sp1"><span>AI评估</span></div>
			</div>
			<div class="w100 h5 bgcb"></div>
			
		</div>
		<div class="w100 flex1 ofh bbx mart10 bgf br2 pdtb5 bbx">
			<div class="wh100 ovy">
				<div class="icon flec center h120 pd010 pdtb10">
					<div class="flex1"></div>
					<div class="pd05 pdtb5 bgcb"><img class="w90" :src="avatar" /></div>
				</div>
				<div class="justify lh25 pd010" style="text-indent:30px;">
					<div>人工智能环境下,资产评估合同签订后,无须编制评估计划,直接进人下一步。 (四) 现场调查 现场调查是评估工作中相当重要的环节之一,不同外部环境下,现场</div>
				</div>
				<div class="h10 flec"><div class="w100 bb1c"></div></div>
				<div class="pdtb10 br5 bbx pd05">
					<div class="title">
						<div class="co marr10 "><span>请问您想咨询什么</span></div>
					</div>
					<div class="pdtb5 bg01 br2 mart5 pd05 mih101" @click="linkto('/do_select')">
						<img :src="bg" class="w100" />
					</div>
				</div>
				<div class="h10 flec"><div class="w100 bb1c"></div></div>
				<div class="pdtb10 pd010 br5 bbx">
					<div class="title">
						<div class="co marr10 pdtb5"><span>请简述您的情况</span></div>
					</div>
					<textarea class="w100 h50 bd1i hovbdci pd05 pdtb5 lh20"></textarea>
				</div>
				<div  class="pdtb10 pd010 br5 bbx mart10">
					<div class="flec cfff">
						<div class="flex1 flec center " @click="linkto('/do_selecti')">
							<div class="h30 w100 btn bgcb" @click="doCheck">
								<span>确定</span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>`,
	data: function () {
		return {
			avatar:'./static/img/cube_174.png',
			bg:'./static/img/swfz.png',
			info:{
				name:'能量养睡',
				last:'2020-03-02',
				times:20,
				sugar:'******',
			},
			id:-1,
		}
	},
	created(){
		let v = this;
		let q = v.$route.query;
		console.log('q',q)
		if (q && q.id) {
			v.id = q.id;
		}
	},
	methods:{
		linkto(u){
			let v = this;
			v.$router.push({path:u})
		},
		doCheck(){},
	}
};
//do_select
var page_do_select = {
	name: 'do_select',
	template: `
	<div name="do_select" class="wh100 pr trs2 bbx flex flc" >
		<div class="wh100 pr bg01 bbx z2">
			<BodyPartPicker :panel="panel" @selected="doSelected" ref="picker"></BodyPartPicker>
		</div>
		<div class="w100 pf l0 r0 b0px pdt10 bbx ofh trs2 bgf brt20 z3" :class="[panel?'h400':'h101']">
			<div class="wh100 bgf pr flex flc">
				<div name="closebtn" class="pa t0 r0 pd05 pdtb5">
					<div class="marr10 wh30 bbx bgf1 btn center" @click="hidePanel" :class="[panel?'ts0':'ts180']">
						<i class="fa fa-angle-down"></i>
					</div>
				</div>
				<div class="wh100 flex flc lh25" name="select-body-part">
					<div name="lable" class="mih40 h40 bbx  flec w100 pd015 bb1a">
						<div class="flec pd010 fsw bgff btn h30 fs16" @click="setLevel(1,1)">
							<span>部位列表</span>
						</div>
						<div class="flex1 flec pd010 c333">
							<div v-if="(level > 1)&&part[index1]" class="marl10" @click="setLevel(1,2)">
								<span v-text="part[index1].l"></span>
								<span class="marl5"> > </span>
							</div>
							<div v-if="(level > 1)&&partv2[index2]" class="marl10" @click="setLevel(1,3)">
								<span v-text="partv2[index2].l"></span>
								<span class="marl5"> > </span>
							</div>
							<div v-if="(level > 1)&&partv3[index3]" class="marl10" @click="setLevel(1,3)">
								<span v-text="partv3[index3].l"></span>
								<span class="marl5"> </span>
							</div>
						</div>
					</div>
					<div class="pd015"><div class="bb1c"></div></div>
					<div class="w100 flex1 ofh pr sen">
						<div class="wh100 pa t0 l0">
							<div v-if="level == 1" class="wh100 ovy">
								<div name="part1" class="flex flw pdtb5 pdl5">
									<div v-for="(v,k) in part" class="body-item pd010 bbx w33 pdtb5" @click="doSelected(v.k,k)">
										<div class="bgff pd05 pdtb10 flec btn">
											<div class="flex1 h25 btn center c333 sp1">
												<div><span v-text="v.l"></span></div>
											</div>
											<div class="pd05"><i class="fa fa-angle-right"></i></div>
										</div>
									</div>
								</div>
								<div class="pdtb10 pd015 bbx">
									<div v-for="(v,k) in list" class="marb5 pdtb5 flec flw right bgff cbsky">
										<div class="btn wh30"><span v-text="k+1"></span></div>
										<div class="marr10 miw50 flec"><span v-text="v.l1"></span><span class="marl5">></span></div>
										<div class="marr10 miw50 flec"><span v-text="v.l2"></span><span class="marl5">></span></div>
										<div class="marr10 miw50 flec"><span v-text="v.l3"></span><span class="marl5">></span></div>
										<div class="flex1"></div>
										<div class="wh25 btn bbx bd1o cr center marr5" @click="deli(v,k)"><i class="fa fa-trash"></i></div>
									</div>
								</div>
							</div>
							<div v-if="level == 2" class="wh100 ovy">
								<div class="pd015 bbx  c333">
									<div class="pdtb5 pd05 bbx bb1c c333 flec">
										<span>选择详细部位</span>
										<div class="flex1"></div>
										<div class="cp sen co" @click="getQuestionF()"><span>下一步</span></div>
									</div>
								</div>
								<div name="part2" class="flex flw pd015 pdtb5">
									<div v-for="(v,k) in partv2" class="pd5 disn" @click="doSelectedi(k)">
										<div class="w55 h25 btn center bgco cfff">
											<div><span v-text="v.l"></span></div>
										</div>
									</div>
									<div v-for="(v,k) in partv2" class="part-item pd010 bbx w33 pdtb5" @click="doSelectedi(k)">
										<div class="bgff pd05 pdtb10 flec btn">
											<div class="flex1 h25 btn center c333 sp1">
												<div><span v-text="v.l"></span></div>
											</div>
											<div class="pd05"><i class="fa fa-angle-right"></i></div>
										</div>
									</div>
								</div>
							</div>
							<div v-if="level == 3" class="wh100 ovy">
								<div v-if="question && question.title" class="pd015 bbx c333 flec">
									<div class="bbx  c333">
										<div class="pdtb10 pd05 bbx"><span v-text="question.title"></span></div>
									</div>
									<div class="flex1"></div>
								</div>
								<div v-else class="pd015 bbx c333 flec">
									<div class="bbx  c333">
										<div class="pdtb10 pd05 bbx"><span>状态情况</span></div>
									</div>
									<div class="flex1"></div>
									<div class="flec">
										<div class="btn w60 center bgco cfff" @click="doAdd()">
											<span>添加</span>
										</div>
									</div>
								</div>
								<div class="pd015"><div class="bb1c"></div></div>
								<div v-if="question && question.option" name="part3" class="flex flw pd015 pdtb5">
									<div v-for="(v,k) in question.option" class="part-item pd010 bbx w100 pdtb5 " @click="doSelectedik(k,v)">
										<div class=" pd05 pdtb10 flec btn" :class="[v.selected ? 'bgf00':'bgff']">
											<div class="flex1 lh20 btn left c333 sp1" >
												<div><span v-text="v.item"></span></div>
											</div>
										</div>
									</div>
								</div>
								<div v-else name="part3" class="flex flw pd015 pdtb5">
									<div v-for="(v,k) in partv3" class="pd5 disn" @click="doSelectedik(k)">
										<div class="w55 h25 btn center bgco cfff bbx" :class="[index3 == k ? 'bd1r':'bd1o']">
											<div><span v-text="v.l"></span></div>
										</div>
									</div>
									<div v-for="(v,k) in partv3" class="part-item pd010 bbx w33 pdtb5" @click="doSelectedik(k)">
										<div class="bgff pd05 pdtb10 flec btn">
											<div class="flex1 h25 btn center c333 sp1" :class="[index3 == k ? 'bd1r':'bd1e']">
												<div><span v-text="v.l"></span></div>
											</div>
										</div>
									</div>
								</div>
								<div class="mart10 pdtb10 pd015" v-if="index3 > -1 && partv3[index3]">
									<div class="pd010 sp1 bgf1 c666 pdtb5 lh25">
										<span v-text="partv3[index3].l"></span>
										<div class="">
											<span v-text="partv3[index3].k">部位皮肤呈暗红色,有强烈的疼痛感觉..</span>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="w100 h50 mih50">
						<div name="next" class="mart5">
							<div v-if="list.length" class="pd015 bbx">
								<div class="pdtb5 flex mih40 ">
									<div class="flex1 flec bbx sp1" _click="setLevel(1,1)">
										<div class="w100 flec bgff h30 pd010">
											<div>共添加</div>
											<div v-text="list.length"></div>
											<div>个症状</div>
											<div class="flex1"></div>
											<div class=""><i class="fa fa-angle-up"></i></div>
										</div>
									</div>
									<div class="flec marl10">
										<div class="btn w60 center h30 bgcb2 cfff" @click="doNext()">
											<span>下一步</span>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>`,
	data: function () {
		return {
			avatar:'./static/img/cube_174.png',
			bg:'./static/img/swfz.png',
			info:{
				name:'能量养睡',
				last:'2020-03-02',
				times:20,
				sugar:'******',
			},
			list:[
				//{index1:-1,l1:'头部',index2:-1,l2:'眼睛',index3:-1,l3:'红肿'},
			],
			level: 1,
			index1: -1,
			index2: -1,
			index3: -1,
			bodys:[
				{k:'Man-FiveSenses',    l:'五官',  v:'3',},
				{k:'Man-Head',          l:'头部',  v:'2',},
				{k:'Man-Neck',          l:'脖子',  v:'4',},
				{k:'Man-Shoulder',      l:'肩膀',  v:'5',},
				{k:'Man-Back',          l:'后背',  v:'6',},
				{k:'Man-Arms',          l:'手臂',  v:'7',},
				{k:'Man-Chest',         l:'胸部',  v:'8',},
				{k:'Man-Abdomen',       l:'腹部',  v:'9',},
				{k:'Man-Hips',          l:'臀部',  v:'10',},
				{k:'Man-Waist',         l:'腰部',  v:'11',},
				{k:'Man-Genitals',      l:'生殖器', v:'12',},
				{k:'Man-Legs',          l:'腿部',  v:'13',},
			],
			part:[
				
			],
			partv2:[
				{k:'head',    l:'眼睛',  v:'1',p:[0,1.68,0.01], r:[0.2,0,0], s:[0.23,0.26,0.265]},
				{k:'neck',    l:'鼻子',  v:'2',p:[0,1.53,-0.01],r:[0,0,0], s:[0.11,0.08,0.115]},
				{k:'shoulder',l:'手指',  v:'3',p:[0,1.49,-0.04],r:[0,0,0], s:[0.385,0.06,0.19]},
				{k:'chest',   l:'手掌',  v:'3',p:[0,1.37, 0.01],r:[0,0,0], s:[0.35,0.19,0.30]},
				{k:'abdomen', l:'耳朵',  v:'3',p:[0,1.15,0.015],r:[0,0,0], s:[0.35,0.25,0.28]},
			],
			partv3:[
				{k:'head',    l:'红肿',  v:'1',p:[0,1.68,0.01], r:[0.2,0,0], s:[0.23,0.26,0.265]},
				{k:'neck',    l:'疼痛',  v:'2',p:[0,1.53,-0.01],r:[0,0,0], s:[0.11,0.08,0.115]},
				{k:'shoulder',l:'发痒',  v:'3',p:[0,1.49,-0.04],r:[0,0,0], s:[0.385,0.06,0.19]},
				{k:'chest',   l:'於青',  v:'3',p:[0,1.37, 0.01],r:[0,0,0], s:[0.35,0.19,0.30]},
				{k:'abdomen', l:'水肿',  v:'3',p:[0,1.15,0.015],r:[0,0,0], s:[0.35,0.25,0.28]},
			],
			question:{},
			panel: false,
			id:-1,
			step: 1,
		}
	},
	created(){
		let v = this;
		let q = v.$route.query;
		console.log('q',q)
		if (q && q.id) {
			v.id = q.id;
		}
		let sl = localStorage.__storage
		if ((window.__storage && window.__storage.length) || sl) {
			let l = window.__storage;
			try {
			   l = JSON.parse(sl);
			}
			catch(err) {
			    l= [];
			}
			// v.list = l;
			// if (v.list.length) v.panel = true;
		}
		v.getBodyPart()
	},
	methods:{
		getBodyPart () {
			let v = this;
			let dt = {btoken: __gls('btoken'),};
			__post({url:__api.body,data:dt,method:'GET'}).then(r => {
				if (r.code == 200) {
					let a = v.bodys;
					let l = r.data;
					let list = [];
					for (let k in l) {
						let it = {
							k:'',
							l:l[k].name,
							v:l[k].id,
							child:[],
						}
						for (let i in a) { if (a[i].v == it.v) it.k = a[i].k; }
						let c = l[k].child;
						for (let n in c) {
							let ci = {
								k:c[n].pid,
								l:c[n].name,
								v:c[n].id,
								child:[]
							}
							it.child.push(ci);
						}
						list.push(it);
					}
					console.log('list',list);
					v.part = list;
				} else {
					__message(r.msg,5000,'cr');
				}
			}).catch(e =>{ console.log(e);})
		},
		setLevel (l,i) {
			let v = this;
			v.panel = true;
			v.level = i;
			v.list = [];
		},
		linkto(u){
			let v = this;
			v.$router.push({path:u})
		},
		hidePanel () {
			let v = this;
			v.panel = !v.panel;
		},
		doSelected (s,pk) {
			let t = typeof s;
			let v = this;
			let k = -1;
			let i = '';
			if (t == 'string') {
				for (let n = 0; n < v.part.length; n++) {
					let ps = v.part[n].k || '';
					let a1 = ps.split('-')[1];
					let id = s.indexOf(a1);
					if (id > -1) {
						i = v.part[n];
						if (v.index1 != n) {
							v.index2 = -1;
							v.index3 = -1;
						}
						k = n;
					}
				}
			}
			if (pk || pk === 0) {
				i = v.part[pk];
				v.index2 = -1;
				v.index3 = -1;
				k = pk;
			}
			console.log('doSelected',t,s,i);
			v.index1 = k;
			v.level = 2;
			//console.log('picker',v.$refs);
			if (v.$refs.picker && v.$refs.picker.setIndex) {
				if (t == 'string') v.$refs.picker.setIndex({s:s})
			}
			v.getChildList();
		},
		getChildList () {
			let v = this;
			let i = v.part[v.index1];
			v.partv2 = [];
			if (i) v.partv2 = i.child;
		},
		doSelectedi(k){
			let v = this;
			v.index2 = k;
			v.level = 3;
			v.list = [];
			v.partv3 = [];
			v.getStatus();
		},
		getQuestionF(){
			let v = this;
			let pi = v.part[v.index1];
			console.log('getQuestionF',v.index1,v.part,)
			if (!pi) return;
			let dt = {step:1, body_id:pi.v,btoken: __gls('btoken'),};
			
			//__post({url:__api.status,data:dt,method:'GET'}).then(r => {
			__post({url:__api.aski,data:dt,method:'GET'}).then(r => {
				
			}).catch(e =>{ console.log(e);})
		},
		getStatus () {
			let v = this;
			let pi = v.partv2[v.index2];
			if (!pi) return;
			let dt = {step:v.step, body_id:pi.v,btoken: __gls('btoken'),};
			
			//__post({url:__api.status,data:dt,method:'GET'}).then(r => {
			__post({url:__api.aski,data:dt,method:'GET'}).then(r => {
				console.log('getStatus',r)
				if (r.code == 200) {
					
					let l = r.data.list || [];
					let a = [];
					for (let i = 0; i < l.length; i++) {
						let it = {
							k:l[i].remark,
							l:l[i].name,
							v:l[i].disease_id,
							child:[]
						};
						a.push(it);
					}
					v.partv3 = a;
				} else {
					if (r.question) {
						if (r.question) {
							if (r.question.option) {
								for (let i = 0; i < r.question.option.length; i++) {
									r.question.option[i].selected = false;
									r.question.option[i].l1 = '';
									r.question.option[i].l2 = '';
									r.question.option[i].step = r.step;
									r.question.option[i].question_id = r.question.question_id;
								}
								
							}
							v.question = r.question;
						}
					} else {
						__message(r.msg,5000,'cr');
					}
					
				}
			}).catch(e =>{ console.log(e);})
		},
		doSelectedik(k,i){
			let v = this;
			if (v.question.option){
				if (v.part[v.index1]) i.l1 = v.part[v.index1].l;
				if (v.partv2[v.index2]) i.l2 = v.partv2[v.index2].l;
				if (v.question.type == 2) {
					i.selected = !i.selected;
				} else {
					for (let i = 0; i < v.question.option.length; i++) {
						v.question.option[i].selected = false;
					}
					i.selected = true;
				}
				let list = []
				for (let i = 0; i < v.question.option.length; i++) {
					if (v.question.option[i].selected) {
						list.push(__copy(v.question.option[i]))
					}
				}
				v.list = list;
				console.log('v.list',v.list);
			}
			v.index3 = k;
		},
		doAdd(){
			let v = this;
			if (!v.partv3[v.index3]) {
				__message('请选择一个状态');
				return;
			}
			let i = {
				index1: v.index1, l1: v.part[v.index1].l,  v1: v.part[v.index1].v,
				index2: v.index2, l2: v.partv2[v.index2].l,v2: v.partv2[v.index2].v,
				index3: v.index3, l3: v.partv3[v.index3].l,v3: v.partv3[v.index3].v,
			};
			v.list.push(i);
			v.index1 = -1;
			v.index2 = -1;
			v.index3 = -1;
			v.level  = 1;
		},
		deli(i,k){
			let v = this;
			if (v.list[k]){
				v.list.splice(k,1);
			}
		},
		doNext(){
			let v = this;
			window.__storage = __copy(v.list);
			__ls('__storage',JSON.stringify(__storage));
			v.$router.push('/sub_confirm');
		},
		doCheck(){},
	}
};
var page_do_selecti = {
	name: 'do_selecti',
	template: `
	<div name="do_selecti" enable="false" class="wh100 pr trs2 bbx flex flc" >
		<div class="wh100 pr bg01">
			<BodyPicker :panel="panel" @selected="doSelected" ref="picker"></BodyPicker>
		</div>
		<div class="w100 pf l0 r0 b0px pdtb10 pd010 bbx ofh trs2 opa8" :class="[panel?'h400':'h60']">
			<div class="wh100 bd1c bgf pr flex flc">
				<div name="closebtn" class="pa t0 r0 pd05 pdtb5">
					<div class=" wh25 bbx bgf1 btn center" @click="hidePanel" :class="[panel?'ts0':'ts180']">
						<i class="fa fa-angle-down"></i>
					</div>
				</div>
				<div class="wh100 flex flc lh25" name="select-body-part">
					<div name="lable" class="h40 bbx bb1c flec w100">
						<div class="flec pd05 fsw" @click="level = 1">
							<span>选择部位及状态</span>
						</div>
						<div class="flex1 flec pd010 co">
							<div v-if="(level > 1)&&part[index1]" class="marl10">
								<span v-text="part[index1].l"></span>
								<span class="marl5"> > </span>
							</div>
							<div v-if="(level > 1)&&partv2[index2]" class="marl10">
								<span v-text="partv2[index2].l"></span>
								<span class="marl5"> > </span>
							</div>
							<div v-if="(level > 1)&&partv3[index3]" class="marl10">
								<span v-text="partv3[index3].l"></span>
								<span class="marl5"> </span>
							</div>
						</div>
					</div>
					<div class="w100 flex1 ofh">
						<div class="wh100 ovy">
							<div v-if="level == 1" class="">
								<div class="pdtb5 pd05 bbx bb1c c333"><span>选择身体部位</span></div>
								<div name="part1" class="flex flw pd05 pdtb5">
									<div v-for="(v,k) in part" class="pd5" @click="doSelected(k)">
										<div class="w55 h25 btn center bgco cfff">
											<div><span v-text="v.l"></span></div>
										</div>
									</div>
								</div>
								<div class="pdtb10 pd05 bbx">
									<div v-for="(v,k) in list" class="marb5 bb1d flec bgf1 cr">
										<div class="btn wh30"><span v-text="k+1"></span></div>
										<div class="marl10 miw50"><span v-text="v.l1"></span><span class="marl5">></span></div>
										<div class="marl10 miw50"><span v-text="v.l2"></span><span class="marl5">></span></div>
										<div class="marl10 miw50"><span v-text="v.l3"></span><span class="marl5">></span></div>
										<div class="flex1"></div>
										<div class="wh25 btn bbx bd1o cr center" @click="deli(v,k)"><i class="fa fa-trash"></i></div>
									</div>
								</div>
							</div>
							<div v-if="level == 2" class="">
								<div class="pdtb5 pd05 bbx bb1c c333 flec">
									<span>选择详细部位</span>
									<div class="flex1"></div>
									<div class="cp sen"><span>下一步</span></div>
								</div>
								<div name="part2" class="flex flw pd05 pdtb5">
									<div v-for="(v,k) in partv2" class="pd5" @click="doSelectedi(k)">
										<div class="w55 h25 btn center bgco cfff">
											<div><span v-text="v.l"></span></div>
										</div>
									</div>
								</div>
							</div>
							<div v-if="level == 3" class="">
								<div class="pdtb5 pd05 bbx bb1c c333 flec">
									<div><span>状态情况</span></div>
									<div class="flex1"></div>
									<div class="flec">
										<div class="btn w60 center bgco cfff" @click="doAdd()">
											<span>添加</span>
										</div>
									</div>
								</div>
								<div name="part3" class="flex flw pd05 pdtb5">
									<div v-for="(v,k) in partv3" class="pd5" @click="doSelectedik(k)">
										<div class="w55 h25 btn center bgco cfff bbx" :class="[index3 == k ? 'bd1r':'bd1o']">
											<div><span v-text="v.l"></span></div>
										</div>
									</div>
								</div>
								<div class="mart10 pdtb10" v-if="index3 > -1">
									<div class="pd010 sp1 bgf1 c666">
										<span v-text="partv3[index3].l"></span>
										<div>
											<span>部位皮肤呈暗红色,有强烈的疼痛感觉..</span>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="w100">
						<div name="next">
							<div v-if="list.length && panel" class="">
								<div class="pdtb5 flex mih40">
									<div class="flex1"></div>
									<div class="flec pd05">
										<div class="btn w60 center  bgco cfff" @click="doNext()">
											<span>下一步</span>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>`,
	data: function () {
		return {
			avatar:'./static/img/cube_174.png',
			bg:'./static/img/swfz.png',
			info:{
				name:'能量养睡',
				last:'2020-03-02',
				times:20,
				sugar:'******',
			},
			list:[
				//{index1:-1,l1:'头部',index2:-1,l2:'眼睛',index3:-1,l3:'红肿'},
			],
			level: 1,
			index1: -1,
			index2: -1,
			index3: -1,
			part:[
				{k:'head',    l:'头部',  v:'1',p:[0,1.68,0.01], r:[0.2,0,0], s:[0.23,0.26,0.265]},
				{k:'neck',    l:'脖子',  v:'2',p:[0,1.53,-0.01],r:[0,0,0], s:[0.11,0.08,0.115]},
				{k:'shoulder',l:'肩部',  v:'3',p:[0,1.49,-0.04],r:[0,0,0], s:[0.385,0.06,0.19]},
				{k:'chest',   l:'胸部',  v:'3',p:[0,1.37, 0.01],r:[0,0,0], s:[0.35,0.19,0.30]},
				{k:'abdomen', l:'腹部',  v:'3',p:[0,1.15,0.015],r:[0,0,0], s:[0.35,0.25,0.28]},
				{k:'hips',    l:'臀部',  v:'3',p:[0,0.95,0.000],r:[0,0,0], s:[0.42,0.15,0.30]},
				{k:'thigh_l', l:'大腿左', v:'3',p:[0.11,0.75,0.012],r:[0,0,0],  s:[0.21,0.25,0.23]},
				{k:'thigh_r', l:'大腿右', v:'3',p:[-0.11,0.75,0.012],r:[0,0,0], s:[0.21,0.25,0.23]},
				{k:'knee_l',  l:'左膝', v:'3',p:[ 0.085,0.54,0.009],r:[0,0,0], s:[0.15,0.18,0.19]},
				{k:'knee_r',  l:'右膝', v:'3',p:[-0.085,0.54,0.009],r:[0,0,0], s:[0.15,0.18,0.19]},
				{k:'shank_l', l:'左胫', v:'3',p:[ 0.081,0.30,0.009],r:[0,0,0], s:[0.15,0.29,0.19]},
				{k:'shank_r', l:'右胫', v:'3',p:[-0.081,0.30,0.009],r:[0,0,0], s:[0.15,0.29,0.19]},
				{k:'ankle_l', l:'左踝', v:'3',p:[ 0.085,0.098,-0.011],r:[0,0,0], s:[0.119,0.10,0.12]},
				{k:'ankle_r', l:'右踝', v:'3',p:[-0.085,0.098,-0.011],r:[0,0,0], s:[0.119,0.10,0.12]},
				{k:'footer_l',l:'左脚', v:'3',p:[ 0.086,0.027, 0.049],r:[0,0,0], s:[0.12,0.08,0.27]},
				{k:'footer_r',l:'右脚', v:'3',p:[-0.086,0.027, 0.049],r:[0,0,0], s:[0.12,0.08,0.27]},
				{k:'arm_l',   l:'左膀', v:'3',p:[ 0.308,1.430,-0.049],r:[0,0,0], s:[0.28,0.119,0.16]},
				{k:'arm_r',   l:'右膀', v:'3',p:[-0.308,1.430,-0.049],r:[0,0,0], s:[0.28,0.119,0.16]},
				{k:'limb_l',  l:'左腕', v:'3',p:[ 0.565,1.438,-0.049],r:[0,0,0], s:[0.24,0.119,0.16]},
				{k:'limb_r',  l:'右腕', v:'3',p:[-0.565,1.438,-0.049],r:[0,0,0], s:[0.24,0.119,0.16]},
				{k:'hand_l',  l:'左手', v:'3',p:[ 0.805,1.425,-0.040],r:[0,0,0], s:[0.198,0.100,0.16]},
				{k:'hand_r',  l:'右手', v:'3',p:[-0.805,1.425,-0.040],r:[0,0,0], s:[0.198,0.100,0.16]},
			],
			partv2:[
				{k:'head',    l:'眼睛',  v:'1',p:[0,1.68,0.01], r:[0.2,0,0], s:[0.23,0.26,0.265]},
				{k:'neck',    l:'脖子',  v:'2',p:[0,1.53,-0.01],r:[0,0,0], s:[0.11,0.08,0.115]},
				{k:'shoulder',l:'手指',  v:'3',p:[0,1.49,-0.04],r:[0,0,0], s:[0.385,0.06,0.19]},
				{k:'chest',   l:'手掌',  v:'3',p:[0,1.37, 0.01],r:[0,0,0], s:[0.35,0.19,0.30]},
				{k:'abdomen', l:'腹部',  v:'3',p:[0,1.15,0.015],r:[0,0,0], s:[0.35,0.25,0.28]},
			],
			partv3:[
				{k:'head',    l:'红肿',  v:'1',p:[0,1.68,0.01], r:[0.2,0,0], s:[0.23,0.26,0.265]},
				{k:'neck',    l:'疼痛',  v:'2',p:[0,1.53,-0.01],r:[0,0,0], s:[0.11,0.08,0.115]},
				{k:'shoulder',l:'发痒',  v:'3',p:[0,1.49,-0.04],r:[0,0,0], s:[0.385,0.06,0.19]},
				{k:'chest',   l:'於青',  v:'3',p:[0,1.37, 0.01],r:[0,0,0], s:[0.35,0.19,0.30]},
				{k:'abdomen', l:'水肿',  v:'3',p:[0,1.15,0.015],r:[0,0,0], s:[0.35,0.25,0.28]},
			],

			panel: false,
			id:-1,
		}
	},
	created(){
		let v = this;
		let q = v.$route.query;
		console.log('q',q)
		if (q && q.id) {
			v.id = q.id;
		}
		let sl = localStorage.__storage
		if ((window.__storage && window.__storage.length) || sl) {
			let l = window.__storage;
			try {
			   l = JSON.parse(sl);
			}
			catch(err) {
			    l= [];
			}
			v.list = l;
			if (v.list.length) {
				v.panel = true;
				
			}
		}
	},
	methods:{
		linkto(u){
			let v = this;
			v.$router.push({path:u})
		},
		hidePanel () {
			let v = this;
			v.panel = !v.panel;
		},
		doSelected (s) {
			let t = typeof s;
			let v = this;
			let k = parseInt(s)||0;
			let i = v.part[k];
			console.log('doSelected',i);
			v.panel = true;
			v.index1 = k;
			v.level = 2;
			//console.log('picker',v.$refs);
			if (v.$refs.picker && v.$refs.picker.setIndex) {
				if (s == 'number') v.$refs.picker.setIndex({i:k,k:i.k})
			}
			v.getChildList();
		},
		getChildList () {
			let v = this;
		},
		doSelectedi(k){
			let v = this;
			v.index2 = k;
			v.level = 3;
			// v.getStatus()
		},
		
		doSelectedik(k){
			let v = this;
			v.index3 = k;
		},
		doAdd(){
			let v = this;
			if (!v.partv3[v.index3]) {
				__message('请选择一个状态');
				return;
			}
			let i = {
				index1: v.index1, l1: v.part[v.index1].l,
				index2: v.index2, l2: v.partv2[v.index2].l,
				index3: v.index3, l3: v.partv3[v.index3].l,
			};
			v.list.push(i);
			v.index1 = -1;
			v.index2 = -1;
			v.index3 = -1;
			v.level  = 1;
		},
		deli(i,k){
			let v = this;
			if (v.list[k]){
				v.list.splice(k,1);
			}
		},
		doNext(){
			let v = this;
			window.__storage = __copy(v.list);
			__ls('__storage',JSON.stringify(__storage));
			v.$router.push('/sub_confirm');
		},
		doCheck(){},
	}
};
var page_sub_confirm = {
	name: 'sub_confirm',
	template: `
	<div name="nav" class="wh100 pr bbx flex flc ofh pdtb10 pd010 bgctx" >
		<div class="h10"></div>
		<div class="pdtb10 pd010 bgf br2">
			<div class="title marb5 pdtb5 flec">
				<div class= "fs16 fsw sp1"><span>确认信息</span></div>
				<div class="flex1 flec pd010 co"></div>
				<div class="w50 h25 btn center bgff fs12" @click="back()">
					<i class="fa fa-angle-left"></i><span class="marl5">返回</span>
				</div>
			</div>
			<div class="w100 h5 bgcb"></div>
		</div>
		<div class="w100 flex1 ofh mart10 bbx ">
			<div class="wh100 pdtb5 bbx ovy bgf">
				<div name="list">
					<div class="pd010">
						<div class="pdtb10  bb1c"><span>症状</span></div>
					</div>
					<div class="pdtb10 pd010 bbx">
						<div v-for="(v,k) in list" class="marb5 pdtb5 flec flw right bgff cbsky">
							<div class="flec w100 lh20 flw">
								<div class="btn wh30"><span v-text="k+1"></span></div>
								<div class="marr10 miw50 flec"><span v-text="v.l1"></span><span class="marl5">></span></div>
								<div class="marr10 miw50 flec"><span v-text="v.l2"></span><span class="marl5">></span></div>
								<div class="marr10 miw50 flec"><span v-text="v.l3 || v.item"></span><span class="marl5">></span></div>
								<div class="flex1"></div>
								<div class="wh25 btn_ disn bbx bd1o cr center marr5 a" _click="doEdit(v,k)">
									<i class="fa fa-pencil"></i>
								</div>
							</div>
							<div class="w100 ofh trs2 left" :class="[v.open ? 'h300':'h0']">
								<div class="wh100 ofh bgf">
									<Status v-model="v.info" :key="k"></Status>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div v-if="content.title" name="userinfo" class="pd010" >
					<div class="pdtb5 pd05 bbx bb1c c333 flec">
						<span v-text="content.title">个人信息</span>
						<div class="flex1"></div>
					</div>
					<div class="pdtb5 mart5 bbx pd05 pdtb5 bd1e lh20 sp1">
						<div v-if="content.type == 0" class="flex flw left">
							<div v-for="(v,k) in content.options" class="flex1 miw150 bbx">
								<div class="pd05 pdtb5">
									<div class="w100 txt" v-html="v.option_name"></div>
								</div>
							</div>
						</div>
						<div v-if="content.type == 1" class="flw left">
							<div v-for="(v,k) in content.options" class="flex1 miw150 bbx flec left btn" @click="switchCk(v,k)">
								<div class="wh20 bbx bd1d btn center" >
									<i v-if="v.ck" class="fa fa-check"></i>
								</div>
								<div class="pd05 pdtb5 flex1">
									<div class="w100 txt" v-html="v.option_name"></div>
								</div>
							</div>
						</div>
						<div v-if="content.type == 2" class="flw left">
							<div v-for="(v,k) in content.options" class="flex1 miw150 bbx flec left btn" @click="switchCk(v,k)">
								<div class="wh20 bbx bd1d btn center" >
									<i v-if="v.ck" class="fa fa-check"></i>
								</div>
								<div class="pd05 pdtb5 flex1">
									<div class="w100 txt" v-html="v.option_name"></div>
								</div>
							</div>
						</div>
						<div v-if="content.type == -1" class="">
							<UserInfo></UserInfo>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="w100 bgf mart10">
			<div name="netx">
				<div v-if="list.length " class="h40">
					<div class="pdtb10 flec bgf">
						<div class="flex1"></div>
						<div class="w100 flec pd010">
							<div class="h30 w100 btn bgco2 cfff sp2" @click="doFinish()">
								<span>确定</span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>`,
	data: function () {
		return {
			avatar:'./static/img/cube_174.png',
			bg:'./static/img/swfz.png',
			info:{
				name:'能量养睡',
				last:'2020-03-02',
				times:20,
				sugar:'******',
			},
			list:[
				//{index1:-1,l1:'头部',index2:-1,l2:'眼睛',index3:-1,l3:'红肿'},
			],
			content: {
				question_id:'',
				title:'',
				type:0, // 1单选 2 多选
				options: [],
			},
			panel: false,
			id:-1,
			step: 0,
			result: 0,
		}
	},
	created(){
		let v = this;
		let s = window.__storage;
		if (!s || !s.length) {
			let str = __gls('__storage');
			if (str) s = JSON.parse(str)
		}
		let l = __copy(s);
		for (let i = 0; i < l.length; i++) {
			let info = {start:'',time:'',use:'',mark:'',k: i}
			l[i].info = info;
			l[i].open = false;
		}
		if (l[0]) {
			v.step = l[0].step + 1;
			v.content.question_id = l[0].question_id;
			v.content.options = l;
		}
		v.list = l;
		console.log('list',s);
		// v.getQuestion();
	},
	methods:{
		switchCk(i,k){
			let v = this;
			if (v.content.type == 1) {
				for (let n = 0; n < v.content.options.length; n++) {
					v.content.options[n].ck = false;
					if (n == k) v.content.options[n].ck = true;
				}
			}
			if (v.content.type == 2) {
				v.content.options[k].ck =  !v.content.options[k].ck;
			}
			
		},
		getQuestion(){
			let v = this;
			let s = [];
			for (let i = 0; i < v.list.length; i++) s.push(v.list[i].v3);
			let dt = {
				//step: 1,
				btoken: __gls('btoken'),
				disease_id:s.toString(','),
			};
			if (v.step) {
				dt.step = v.step ;
				dt.question_id = v.content.question_id;
				let il = v.content.options || [];
				let is = [];
				for (let n = 0; n < il.length; n++) {
					if (il[n].ck || il[n].selected) is.push(il[n].option_id)
				}
				if (is.length) dt.option_id = is.toString(',');
				if (il.length && !is.length && (v.content.type > 0)) {
					__message('请选择一个选项..');
					return;
				}
			}
			
			//__post({url:__api.ask,data:dt,method:'GET'}).then(r => {
			__post({url:__api.aski,data:dt,method:'GET'}).then(r => {
				if (r.code == 200) {
					v.content.options = [];
					v.step = r.data.setp;
					v.result = r.data.result
					let options = r.data.content.options || [];
					for (let i = 0; i < options.length; i++) {
						options[i].ck = false;
					}
					r.data.content.options = options;
					v.content = r.data.content;
					console.log('result',v.result,r.data.result)
					if (v.result == 1) {
						__ls('__service',JSON.stringify(r.data.content));
						v.doFinish();
					}
				} else {
					if (r.is_over) {
						__message('诊断完成，请等诊断结果..',5000,'cg');
						let result =  r;
						v.getResult(5000,result);
					} else if (r.question){
						v.step = r.step + 1;
						v.content.question_id = r.question.question_id;
						v.content.title = r.question.title; 
						v.content.type = r.question.type; 
						//type
						let ql = r.question.option || [];
						let ls = []
						for (let n = 0; n < ql.length; n++){
							ql[n].ck = false;
							ql[n].option_name = ql[n].item;
						}
						v.content.options = ql;
						console.log('content',v.content);
					}else{
						__message(r.msg,5000,'cr');
					}
					
				}
			}).catch(e =>{ console.log(e);})
		},
		linkto(u){
			let v = this;
			v.$router.push({path:u})
		},
		back(){
			let v = this;
			v.$router.push('/do_select');
		},
		doEdit(i,k){
			let v = this;
			i.open = !i.open;
		},
		getResult(t,res){
			let v = this;
			if (!t) t = 100;
			__ss('result',JSON.stringify(res));
			setTimeout(function () {
				v.$router.push('/query_result');
			},t)
			
		},
		doFinish(){
			let v = this;
			if (v.result == 0) {
				v.getQuestion();
			} else {
				v.getResult();
			}
		},
		doCheck(){},
	}
};
var page_query_result = {
	name: 'query_result',
	template: `
	<div name="nav" class="wh100 pr trs2 bbx pdtb10 pd010 bgctx flex flc" >
		<div class="h10"></div>
		<div class="pdtb10 pd010 bgf br2">
			<div class="title marb5 pdtb5 flec">
				<div class= "fs16 fsw sp1"><span>评估结果</span></div>
				<div class="flex1 flec pd010 co"></div>
			</div>
			<div class="w100 h5 bgcb"></div>
		</div>
		<div class="w100 flex1 ofh pr mart10 bgf" >
			<div class="wh100 ovy bbx pdtb5">
				<div class="pdtb5 pd010"><span>根据您的表现,AI综合评估结果如下:</span></div>
				<div class="pd010"><div class="bb1e"></div></div>
				<div class="pdtb5 pd010">
					<div v-if="analysis" class="">
						<div class="fsw mart10"><span>评估分析</span></div>
						<div class="justify" style="text-indent:30px;">
							<span v-html="analysis"></span>
						</div>
						<div class="fsw mart10"><span>紧急建议</span></div>
						<div class="justify" style="text-indent:30px;"><span v-html="suggest"></span></div>
					</div>
					<div v-else-if="result.result">
						<div class="fsw mart10"><span v-text="result.result"></span></div>
					</div>
				</div>
				<div class="pd010"><div class="bb1c"></div></div>
				<div class="pdtb5 pd010 mart10 fsw co "><span>推荐方案</span></div>
				<div class="pd010"><div class="bb1e"></div></div>
				<div class="pdtb5 pd010">
					<div v-for="(v,k) in list" class="marb5 bd1c bbx" @click="index=k">
						<div class="h30 flec pd05" >
							<div class="btn wh20 bd1c center bbx">
								<i v-if="index==k" class="fa fa-check"></i>
							</div>
							<span class="marl10" v-text="v.name"></span>
						</div>
						<div class="pdtb5 pd05 bgff" v-if="v.content"><span v-text="v.content"></span></div>
					</div>
				</div>
				<div class="pd010"><div class="bb1c"></div></div>
				<div v-if="index > -1" name="select_plan" class="mart10">
					<div class="pd010">
						<div class="pdtb5 flex mih40 lh30">
							<div class="flec  w100">
								<div class="btn w100 center bgco cfff" @click="doSubmit()">
									<span>预约方案</span>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="h40"></div>
				<div v-id="result.ask && result.ask.length">
					<div class="pd010">
						<div v-for="(v,k) in result.ask" class=" flex">
							<div v-if="v.qa" class="  w100 fs12">
								<div v-for="(a,b) in v.qa" class="lh25">
									<div class="co flec" >
										<div class="w45">
											<span v-text = "k+1"></span>
											<span >-</span>
											<span v-text = "b+1"></span>
											<span >:</span>
										</div>
										<div class="flex1">
											<span v-text="a.question"></span>
										</div>
									</div>
									<div class="flec" >
										<div class="w45">
										</div>
										<div class="flex1">
											<span v-text="a.answer"></span>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>`,
	data: function () {
		return {
			list:[
				{name:'方案一',content:''},
				{name:'方案二',content:''},
			],
			index: -1,
			analysis:'',
			suggest:'',
			panel: false,
			id:-1,
			plan_id: -1,
			result:{
				ask: []
			},
		}
	},
	created(){
		let v = this;
		let res = __gss('result');
		//v.getList();
		if(res) {
			v.list = [];
			let result = {};
			console.log('result',res);
			result = JSON.parse(res);
			console.log('query_result result',result);
			if (result.result)v.result = result;
			if (result.result_des) {
				v.analysis = result.result_des;
			}
			if (result.service) {
				let l = result.service || [];
				for(let i = 0; i < l.length; i++) {
					l[i].ck = false;
				}
				v.list = l;
			}
			v.result = result;
		}
		
	},
	methods:{
		linkto(u){
			let v = this;
			v.$router.push({path:u})
		},
		getList() {
			let v = this;
			let s = __gls('__service');
			let l = {};
			try {
			   l = JSON.parse(s);
			   v.list = l.service;
			   v.analysis = l.advice_urgent;
			   v.suggest = l.advice_review;
			   v.plan_id = l.plan_id;
			}catch(err) {
			   l = {};
			}
			console.log('__service',l);
		},
		doSubmit() {
			let v = this;
			let i = v.list[v.index];
			if (!i) return;
			let data = {
				// plan_id: v.plan_id,
				// service_id: i.service_id,
				wz_id:v.result.wz_id,
				sids: i.service_id,
				btoken: __gls('btoken'),
			};
			__post({url:__api.reserve,data:data}).then(r=>{
				if (r.code == 200) {
					__message(r.msg,5000,'cg');
					v.$router.push({path:'/user_service'});
				}
			}).catch(e=>{console.log(e);})
		},
	}
};
//page_reset_password 
var page_reset_password = {
	name: 'reset_password',
	template: `
	<div name="reset_password" class="wh100 pr ovy trs2 bbx pdtb10 pd010 bgctx" >
		<div class="wh100 pr flex flc">
			<div class="h10"></div>
			<div name="lable" class="h40 pdtb10 pd010 bbx flec w100 mih40 lh25 bgf br2">
				<div class="flec pd05 fsw" @click="level = 1">
					<span>修改密码</span>
				</div>
				<div class="flex1 flec pd010 co"></div>
			</div>
			<div class="w100 ofh lh20 ">
				<div class=" ovy">
					<form class="bgf br2 mart10 pdtb10 pd010 bbx">
						<div class="h20"></div>
						<div class="fm-row h40 flec marb10 bbx bb1c">
							<div class="w80 pd010">
								<div class="w100 justify-all"><span>登录密码</span></div>
							</div>
							<div class="flex1 ofh flec">
								<input type="text" class="bdn w100 ih" placeholder="请输入登录密码" />
							</div>
						</div>
						<div class="fm-row h40 flec marb10 bbx bb1c">
							<div class="w80 pd010">
								<div class="w100 justify-all"><span>确认密码</span></div>
							</div>
							<div class="flex1 ofh flec">
								<input type="text" class="bdn w100 ih" placeholder="请确认登录密码" />
							</div>
						</div>
						<div  class="fm-row h40 flec marb10 bbx bb1c">
							<div class="w80 pd010">
								<div class="w100 justify-all"><span>验证码</span></div>
							</div>
							<div class="flex1 ofh flec">
								<input type="text" class="bdn w100 ih" />
							</div>
						</div>
						<div class="h20"></div>
					</form>
					<div class="mart10 bgf br2 pdtb10 ">
						<div class="fm-row flec pdtb10 w100 pd010 bbx">
							<div class="btn w100 center cfff subh br49 bgcb2 bbx" @click="doSave">
								<span v-if="waiting"><i class="fa fa-spin"></i></span>
								<span>保存</span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>`,
	data: function () {
		return {
			pwd1:'',
			pwd2:'',
			code:'',
			panel: false,
			id:-1,
			waiting: false,
		}
	},
	created(){
		let v = this;
	},
	methods:{
		linkto(u){
			let v = this;
			v.$router.push({path:u})
		},
		doSave() {
			let v = this;
			let data = {};
			v.waiting = true;
			__post({url:'',data:data}).then(r=>{
			})
		},
	}
};


var page_do_select_f_q = {
	name: 'do_select_f_q',
	template: `
	<div name="do_select_f_q" class="wh100 pr trs2 bbx flex flc" >
		<div class="wh100 pr bg01 bbx z2">
			<BodyPartPicker :panel="panel" @selected="doSelected" ref="picker"></BodyPartPicker>
		</div>
		<div class="w100 pf l0 r0 b0px pdt10 bbx ofh trs2 bgf brt20 z3" :class="[panel?'h400':'h101']">
			<div class="wh100 bgf pr flex flc">
				<div name="closebtn" class="pa t0 r0 pd05 pdtb5">
				
					<div v-if="qsmode" class="marr10 wh30 bbx bgf1 btn center" @click="qsmode = false" >
						<i class="fa fa-angle-left"></i>
					</div>
					<div v-else class="marr10 wh30 bbx bgf1 btn center" @click="hidePanel" :class="[panel?'ts0':'ts180']">
						<i class="fa fa-angle-down"></i>
					</div>
				</div>
				<div class="wh100 flex flc lh25" name="select-body-part">
					<div name="lable" class="mih40 h40 bbx  flec w100 pd015 bb1a">
						<div class="flec pd010 fsw bgff btn h30 fs16" @click="setLevel(1,1)">
							<span>部位列表</span>
						</div>
						<div class="flex1 flec pd010 c333">
							<div v-if="(level > 1)&&part[index1]" class="marl10" @click="setLevel(1,2)">
								<span v-text="part[index1].l"></span>
								<span class="marl5"> > </span>
							</div>
							<div v-if="(level > 1)&&partv2[index2]" class="marl10" @click="setLevel(1,3)">
								<span v-text="partv2[index2].l"></span>
								<span class="marl5"> > </span>
							</div>
							<div v-if="(level > 1)&&partv3[index3]" class="marl10" @click="setLevel(1,3)">
								<span v-text="partv3[index3].l"></span>
								<span class="marl5"> </span>
							</div>
						</div>
					</div>
					<div class="pd015"><div class=""></div></div>
					<div v-if="qsmode" class="w100 flex1 ofh pr sen">
						<div class="wh100 pa t0 l0 ovy" name="qsbox" v-if="selectedmode">
							<div  v-for="(v,k) in questions" class="pd015 bbx bb1c w100 flec bgff" @click="selectedQsi(v,k)">
								<div class="flex1 ofh">
									<div class=" pd05 pdtb10 flec btn" :class="[v.selected ? 'bgf00':'bgff']">
										<div class="flex1 lh20 btn left c333 sp1" >
											<div><span v-text="v.title"></span></div>
										</div>
									</div>
								</div>
								<div class="w30 btn">
									<div>
										<i class="fa fa-angle-right"></i>
									</div>
								</div>
							</div>
						</div>
						<div class="wh100 pa t0 l0 ovy" name="qsbox" v-else>
							<div class="mrb10 flex pdtb5 pd020 fsw co">
								<div name="qstitle">
									<div v-text="currentQi.title"></div>
								</div>
							</div>
							<div  v-for="(v,k) in currentQi.option" class="pd015 bbx bb1c w100 flec bgff" @click="selectedQsopt(v,k)">
								<div class="flex1 ofh flec">
									<div class="pd05 btn" v-if="currentQi.type == 2">
										<div class="wh18 bd1c btn center">
											<i v-if="v.selected" class="fa fa-check"></i>
										</div>
									</div>
									<div class=" pd05 pdtb10 flec btn" _class="[v.selected ? 'bgf00':'bgff']">
										<div class="flex1 lh20 btn left c333 sp1" >
											<div><span v-text="v.item"></span></div>
										</div>
									</div>
								</div>
								<div class="w30 btn">
									<div>
										<i class="fa fa-angle-right"></i>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div v-else class="w100 flex1 ofh pr sen">
						<div class="wh100 pa t0 l0">
							<div v-if="level == 1" class="wh100 ovy">
								<div name="part1" class="flex flw pdtb5 pdl5">
									<div v-for="(v,k) in part" class="body-item pd010 bbx w33 pdtb5" @click="doSelected(v.k,k)">
										<div class="bgff pd05 pdtb10 flec btn">
											<div class="flex1 h25 btn center c333 sp1">
												<div><span v-text="v.l"></span></div>
											</div>
											<div class="pd05"><i class="fa fa-angle-right"></i></div>
										</div>
									</div>
								</div>
								<div class="pdtb10 pd015 bbx">
									<div v-for="(v,k) in list" class="marb5 pdtb5 flec flw right bgff cbsky">
										<div class="btn wh30"><span v-text="k+1"></span></div>
										<div class="marr10 miw50 flec"><span v-text="v.l1"></span><span class="marl5">></span></div>
										<div class="marr10 miw50 flec"><span v-text="v.l2"></span><span class="marl5">></span></div>
										<div class="marr10 miw50 flec"><span v-text="v.l3"></span><span class="marl5">></span></div>
										<div class="flex1"></div>
										<div class="wh25 btn bbx bd1o cr center marr5" @click="deli(v,k)"><i class="fa fa-trash"></i></div>
									</div>
								</div>
							</div>
							<div v-if="level == 2" class="wh100 ovy">
								<div class="pd015 bbx  c333">
									<div class="pdtb5 pd05 bbx bb1c c333 flec">
										<span>选择详细部位</span>
										<div class="flex1"></div>
										<div class="cp sen co" @click="getQuestionF(0)"><span>开始问诊</span></div>
									</div>
								</div>
								<div name="part2" class="flex flw pd015 pdtb5">
									<div v-for="(v,k) in partv2" class="pd5 disn" @click="doSelectedi(k)">
										<div class="w55 h25 btn center bgco cfff">
											<div><span v-text="v.l"></span></div>
										</div>
									</div>
									<div v-for="(v,k) in partv2" class="part-item pd010 bbx w33 pdtb5" @click="doSelectedi(k)">
										<div class="bgff pd05 pdtb10 flec btn">
											<div class="flex1 h25 btn center c333 sp1">
												<div><span v-text="v.l"></span></div>
											</div>
											<div class="pd05"><i class="fa fa-angle-right"></i></div>
										</div>
									</div>
								</div>
							</div>
							<div v-if="level == 3" class="wh100 ovy">
								<div  class="pd015 bbx c333 flec">
									<div class="pdtb5 pd05 bbx bb1c c333 flec w100">
										<span></span>
										<div class="flex1"></div>
										<div class="cp sen co" @click="getQuestionF(1)"><span>开始问诊</span></div>
									</div>
								</div>
								<div class="pd015"><div class="bb1c"></div></div>
								<div v-if="question && question.option" name="part3" class="flex flw pd015 pdtb5">
									<div v-for="(v,k) in question.option" class="part-item pd010 bbx w100 pdtb5 " @click="doSelectedik(k,v)">
										<div class=" pd05 pdtb10 flec btn" :class="[v.selected ? 'bgf00':'bgff']">
											<div class="flex1 lh20 btn left c333 sp1" >
												<div><span v-text="v.item"></span></div>
											</div>
										</div>
									</div>
								</div>
								<div v-else name="part3" class="flex flw pd015 pdtb5">
									<div v-for="(v,k) in partv3" class="pd5 disn" @click="doSelectedik(k)">
										<div class="w55 h25 btn center bgco cfff bbx" :class="[index3 == k ? 'bd1r':'bd1o']">
											<div><span v-text="v.l"></span></div>
										</div>
									</div>
									<div v-for="(v,k) in partv3" class="part-item pd010 bbx w33 pdtb5" @click="doSelectedik(k)">
										<div class="bgff pd05 pdtb10 flec btn">
											<div class="flex1 h25 btn center c333 sp1" :class="[index3 == k ? 'bd1r':'bd1e']">
												<div><span v-text="v.l"></span></div>
											</div>
										</div>
									</div>
								</div>
								<div class="mart10 pdtb10 pd015" v-if="index3 > -1 && partv3[index3]">
									<div class="pd010 sp1 bgf1 c666 pdtb5 lh25">
										<span v-text="partv3[index3].l"></span>
										<div class="">
											<span v-text="partv3[index3].k">部位皮肤呈暗红色,有强烈的疼痛感觉..</span>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="w100 h50 mih50">
						<div name="next" v-if="qsmode" class="mart5">
							<div v-if="currentQi.type == 2" class="pd015 bbx">
								<div class="pdtb5 flex mih40 ">
									<div class="flex1 flec bbx sp1" ></div>
									<div class="flec marl10">
										<div class="btn w60 center h30 bgcb2 cfff" @click="doSelectedQsopt()">
											<span>下一步</span>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div name="next" class="mart5">
							<div v-if="list.length" class="pd015 bbx">
								<div class="pdtb5 flex mih40 ">
									<div class="flex1 flec bbx sp1" _click="setLevel(1,1)">
										<div class="w100 flec bgff h30 pd010">
											<div>共添加</div>
											<div v-text="list.length"></div>
											<div>个症状</div>
											<div class="flex1"></div>
											<div class=""><i class="fa fa-angle-up"></i></div>
										</div>
									</div>
									<div class="flec marl10">
										<div class="btn w60 center h30 bgcb2 cfff" @click="doNext()">
											<span>下一步</span>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>`,
	data: function () {
		return {
			avatar:'./static/img/cube_174.png',
			bg:'./static/img/swfz.png',
			info:{
				name:'能量养睡',
				last:'2020-03-02',
				times:20,
				sugar:'******',
			},
			list:[
				//{index1:-1,l1:'头部',index2:-1,l2:'眼睛',index3:-1,l3:'红肿'},
			],
			level: 1,
			index1: -1,
			index2: -1,
			index3: -1,
			bodys:[
				{k:'Man-FiveSenses',    l:'五官',  v:'3',},
				{k:'Man-Head',          l:'头部',  v:'2',},
				{k:'Man-Neck',          l:'脖子',  v:'4',},
				{k:'Man-Shoulder',      l:'肩膀',  v:'5',},
				{k:'Man-Back',          l:'后背',  v:'6',},
				{k:'Man-Arms',          l:'手臂',  v:'7',},
				{k:'Man-Chest',         l:'胸部',  v:'8',},
				{k:'Man-Abdomen',       l:'腹部',  v:'9',},
				{k:'Man-Hips',          l:'臀部',  v:'10',},
				{k:'Man-Waist',         l:'腰部',  v:'11',},
				{k:'Man-Genitals',      l:'生殖器', v:'12',},
				{k:'Man-Legs',          l:'腿部',  v:'13',},
			],
			part:[
				
			],
			partv2:[
				{k:'head',    l:'眼睛',  v:'1',p:[0,1.68,0.01], r:[0.2,0,0], s:[0.23,0.26,0.265]},
				{k:'neck',    l:'鼻子',  v:'2',p:[0,1.53,-0.01],r:[0,0,0], s:[0.11,0.08,0.115]},
				{k:'shoulder',l:'手指',  v:'3',p:[0,1.49,-0.04],r:[0,0,0], s:[0.385,0.06,0.19]},
				{k:'chest',   l:'手掌',  v:'3',p:[0,1.37, 0.01],r:[0,0,0], s:[0.35,0.19,0.30]},
				{k:'abdomen', l:'耳朵',  v:'3',p:[0,1.15,0.015],r:[0,0,0], s:[0.35,0.25,0.28]},
			],
			partv3:[
				{k:'head',    l:'红肿',  v:'1',p:[0,1.68,0.01], r:[0.2,0,0], s:[0.23,0.26,0.265]},
				{k:'neck',    l:'疼痛',  v:'2',p:[0,1.53,-0.01],r:[0,0,0], s:[0.11,0.08,0.115]},
				{k:'shoulder',l:'发痒',  v:'3',p:[0,1.49,-0.04],r:[0,0,0], s:[0.385,0.06,0.19]},
				{k:'chest',   l:'於青',  v:'3',p:[0,1.37, 0.01],r:[0,0,0], s:[0.35,0.19,0.30]},
				{k:'abdomen', l:'水肿',  v:'3',p:[0,1.15,0.015],r:[0,0,0], s:[0.35,0.25,0.28]},
			],
			question:{},
			qsmode: false,
			selectedmode: false,
			selectedQs: {},
			selectedBody: {},
			currentQi:{
				option:[],
				title:'',
				question_id: 0,
				type:0
			},
			questions:[],
			panel: false,
			id:-1,
			step: 1,
		}
	},
	created(){
		let v = this;
		let q = v.$route.query;
		console.log('q',q)
		if (q && q.id) {
			v.id = q.id;
		}
		let sl = localStorage.__storage
		if ((window.__storage && window.__storage.length) || sl) {
			let l = window.__storage;
			try {
			   l = JSON.parse(sl);
			}
			catch(err) {
			    l= [];
			}
		}
		v.getBodyPart()
	},
	methods:{
		getBodyPart () {
			let v = this;
			let dt = {btoken: __gls('btoken'),};
			__post({url:__api.body,data:dt,method:'GET'}).then(r => {
				if (r.code == 200) {
					let a = v.bodys;
					let l = r.data;
					let list = [];
					for (let k in l) {
						let it = {k:'',l:l[k].name,v:l[k].id,child:[],}
						for (let i in a) { if (a[i].v == it.v) it.k = a[i].k; }
						let c = l[k].child;
						for (let n in c) {
							let ci = {k:c[n].pid,l:c[n].name,v:c[n].id,child:[]}
							it.child.push(ci);
						}
						list.push(it);
					}
					console.log('list',list);
					v.part = list;
					// v.getFirstQuestion();
				} else {
					__message(r.msg,5000,'cr');
				}
			}).catch(e =>{ console.log(e);})
		},
		getFirstQuestionList(k){
			let v = this;
			// 第一次传身体ID 之后传问题ID
			let pi = v.part[v.index1];
			if (k == 1) {
				pi = v.partv2[v.index2];
			}
			v.selectedBody = __copy(pi);
			console.log('getFirstQuestionList',pi)
			let dt = {step:0, body_id: pi.v, btoken: __gls('btoken'),};
			__post({url:__api.aski,data:dt,method:'GET'}).then(r => {
				v.questions = [];
				if (r.question) {
					v.qsmode = true;
					v.step = 1;
					v.questions = r.question;
					v.selectedmode = true;
				}
			}).catch(e =>{ console.log(e);})
		},
		selectedQsi(i,k){
			let v = this;
			v.selectedQs = __copy(i);
			let dt = {step: v.step, question_id: i.question_id, btoken: __gls('btoken'),};
			__post({url:__api.aski,data:dt,method:'GET'}).then(r => {
				if(r.step == v.step && r.question){
					let rq = r.question;
					if (rq.option) {
						for(let m = 0; m < rq.option.length; m++) rq.option[m].selected = false;
					}
					v.currentQi = rq;
					v.selectedmode = false;
					v.lastQs = __copy(v.currentQi);
				}
			}).catch(e =>{ console.log(e);})
		},
		doSelectedQsopt(){
			let v = this;
			let ol = v.currentQi.option || [];
			let sa = [];
			for (let i = 0; i < ol.length; i++) {
				if(ol[i].selected) sa.push(ol[i].option_id);
			}
			if (sa.length == 0) {
				__message('请选择至少一个答案..',3000,'co');
				return;
			}
			console.log('selectedQsopt currentQi',v.currentQi);
			let dt = {step: v.step + 1, question_id: v.currentQi.question_id, option_id: sa.toString(),btoken: __gls('btoken'),};
			__post({url:__api.aski,data:dt,method:'GET'}).then(r => {
				if(r.step == (v.step + 1) && r.question){
					v.step = r.step;
					v.lastQs = __copy(v.currentQi);
					let rq = r.question
					if (rq.option) {
						for(let m = 0; m < rq.option.length; m++) rq.option[m].selected = false;
					}
					v.currentQi = rq;
					v.selectedmode = false;
				}
				if (r.is_over) {
					__message('诊断完成，请等诊断结果..',5000,'cg');
					let result =  r;
					v.getQsResult(2000,result);
				}
			}).catch(e =>{ console.log(e);})
		},
		selectedQsopt(i,k){
			let v = this;
			if (v.currentQi.type == 2) {
				i.selected = !i.selected;
				return;
			}
			console.log('selectedQsopt currentQi',v.currentQi);
			let dt = {step: v.step + 1, question_id: v.currentQi.question_id, option_id: i.option_id,btoken: __gls('btoken'),};
			__post({url:__api.aski,data:dt,method:'GET'}).then(r => {
				if(r.step == (v.step + 1) && r.question){
					v.step = r.step;
					v.lastQs = __copy(v.currentQi);
					let rq = r.question
					if (rq.option) {
						for(let m = 0; m < rq.option.length; m++) rq.option[m].selected = false;
					}
					v.currentQi = rq;
					v.selectedmode = false;
				}
				if (r.is_over) {
					__message('诊断完成，请等诊断结果..',5000,'cg');
					let result =  r;
					v.getQsResult(2000,result);
				}
			}).catch(e =>{ console.log(e);})
		},
		getQsResult(t,res){
			let v = this;
			if (!t) t = 100;
			__ss('result',JSON.stringify(res));
			setTimeout(function () {
				v.$router.push('/query_result');
			},t)
			
		},
		setLevel (l,i) {
			let v = this;
			if (v.qsmode) {
				return;
			}
			v.panel = true;
			v.level = i;
			v.list = [];
		},
		linkto(u){
			let v = this;
			v.$router.push({path:u})
		},
		hidePanel () {
			let v = this;
			v.panel = !v.panel;
		},
		doSelected (s,pk) {
			let t = typeof s;
			let v = this;
			let k = -1;
			let i = '';
			if (t == 'string') {
				for (let n = 0; n < v.part.length; n++) {
					let ps = v.part[n].k || '';
					let a1 = ps.split('-')[1];
					let id = s.indexOf(a1);
					if (id > -1) {
						i = v.part[n];
						if (v.index1 != n) {
							v.index2 = -1;
							v.index3 = -1;
						}
						k = n;
					}
				}
			}
			if (pk || pk === 0) {
				i = v.part[pk];
				v.index2 = -1;
				v.index3 = -1;
				k = pk;
			}
			console.log('doSelected',t,s,i);
			v.index1 = k;
			v.level = 2;
			//console.log('picker',v.$refs);
			if (v.$refs.picker && v.$refs.picker.setIndex) {
				if (t == 'string') v.$refs.picker.setIndex({s:s})
			}
			v.getChildList();
		},
		getChildList () {
			let v = this;
			let i = v.part[v.index1];
			v.partv2 = [];
			if (i) v.partv2 = i.child;
			console.log('v.partv2',v.partv2)
		},
		doSelectedi(k){
			let v = this;
			v.index2 = k;
			v.level = 3;
			v.list = [];
			v.partv3 = [];
			// v.getStatus();
		},
		getQuestionF(k){
			let v = this;
			v.getFirstQuestionList(k);
		},
		getStatus () {
			let v = this;
			let pi = v.partv2[v.index2];
			if (!pi) return;
			let dt = {step:v.step, body_id:pi.v,btoken: __gls('btoken'),};
			
			//__post({url:__api.status,data:dt,method:'GET'}).then(r => {
			__post({url:__api.aski,data:dt,method:'GET'}).then(r => {
				console.log('getStatus',r)
				
			}).catch(e =>{ console.log(e);})
		},
		doSelectedik(k,i){
			let v = this;
			if (v.question.option){
				if (v.part[v.index1]) i.l1 = v.part[v.index1].l;
				if (v.partv2[v.index2]) i.l2 = v.partv2[v.index2].l;
				if (v.question.type == 2) {
					i.selected = !i.selected;
				} else {
					for (let i = 0; i < v.question.option.length; i++) {
						v.question.option[i].selected = false;
					}
					i.selected = true;
				}
				let list = []
				for (let i = 0; i < v.question.option.length; i++) {
					if (v.question.option[i].selected) {
						list.push(__copy(v.question.option[i]))
					}
				}
				v.list = list;
				console.log('v.list',v.list);
			}
			v.index3 = k;
		},
		doAdd(){
			let v = this;
			if (!v.partv3[v.index3]) {
				__message('请选择一个状态');
				return;
			}
			let i = {
				index1: v.index1, l1: v.part[v.index1].l,  v1: v.part[v.index1].v,
				index2: v.index2, l2: v.partv2[v.index2].l,v2: v.partv2[v.index2].v,
				index3: v.index3, l3: v.partv3[v.index3].l,v3: v.partv3[v.index3].v,
			};
			v.list.push(i);
			v.index1 = -1;
			v.index2 = -1;
			v.index3 = -1;
			v.level  = 1;
		},
		deli(i,k){
			let v = this;
			if (v.list[k]){
				v.list.splice(k,1);
			}
		},
		doNext(){
			let v = this;
			window.__storage = __copy(v.list);
			__ls('__storage',JSON.stringify(__storage));
			v.$router.push('/sub_confirm');
		},
		doCheck(){},
	}
};